import {mapGetters} from 'vuex';
export default {
  computed:{
    ...mapGetters('car',['total'])
  },
  watch:{
    total() {
       this.setTabBarNum()
    }
  },
  onShow() {
     this.setTabBarNum()
  },
  methods: {
  	setTabBarNum() {
      uni.setTabBarBadge({
        index:2,
        text:this.total + ''
      })
    }
  }
}